Errors and warnings in ST
This section quotes all errors and warnings that might occur when entering the ST-code or when entering the FBD-logic in the FBD-editor.
However, it is possible that errors/warnings occur for the ST-editor as when validating the application. See "Errors and warnings when validating the application" for these messages and their appropriate solution.
Missing IEC-keyword or IEC-identifier
Solution: Complete the syntax so that it is a valid object. See "Supported ST-syntax"
Examples:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
In the declaration of the →variables, enter the missing character " |
|
|
In the declaration of the variables, enter the missing character " |
|
|
In the declaration of the variables, enter |
|
|
In the →assignment, enter the missing character " |
|
|
In the assignment, enter the missing assignment operator " |
Unexpected character 'name'
Solution: Delete the faulty character or replace it by the correct syntax. See troubleshooting article "Message 'Unexpected character' is displayed for initial value within the ST-editor", if the message is displayed for an initial value.
Examples:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
At the end of the declaration, delete the invalid character. |
|
|
In the declaration of a function, enter a name that must be an IEC-identifier. |
|
|
In the declaration of a →program, enter an →IEC-identifier as name. |
|
|
In the declaration of a →function block, enter an IEC-identifier as name. |
|
|
In the declaration of a →function, enter an IEC-identifier as name. |
|
|
|
|
|
In the declaration of the →variables, enter an IEC-identifier as name. |
|
|
In the declaration of more variables, enter the missing character " |
|
|
In the declaration of the variables, delete the faulty character or replace it by characters so that an IEC-identifier is entered as name. |
|
|
In the declaration of the variables, delete the unexpected character inserted before the character " |
|
|
Correct the declaration of the variables so that it is a valid declaration. |
|
|
Correct the assigned data type so that its spelling matches the supported data types. |
|
|
In the →assignment, enter the expression on the right side of the assignment operator " |
|
|
In the assignment, replace the faulty character by the assignment operator " |
|
|
In the assignment, replace the faulty character by character " |
|
|
In the assignment, delete the invalid character before the character " |
|
|
In the assignment, enter one of the possible constructs. See "Supported ST-syntax" for those constructs. |
|
|
|
|
|
For the function call, enter an identifier existing for functions (as shown in the example). Alternative: Enter the missing declaration for the function. |
|
|
For the function call, enter an identifier existing for functions (as shown in the example). Alternative: Enter the missing declaration for the function. |
|
|
|
|
|
|
|
|
Instead of the →generic data type, enter an elementary data type (see "Supported data types (in ST)"). |
|
|
In the declaration of a →program, enter a name that must be an →IEC-identifier. |
|
|
In the declaration of a →function block, enter a name that must be an IEC-identifier. |
|
|
In the declaration of the →function, enter the keyword |
|
|
In the declaration of the variables, insert a variable or delete the character " |
Could not resolve reference to 'name'. A variable with this name does not exist. or
Could not resolve reference to "name". A method with this name does not exist.
Solution: Complete the syntax so that it is a valid object. See "Supported ST-syntax"
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
In the declaration of the →variables, enter the mentioned expression so that the expression is a declared variable (as shown in the example). |
Could not resolve reference to 'name'. A function or function block instance with this name does not exist.
Solution: Complete the syntax so that it is a valid object. See "Supported ST-syntax"
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
Declare the required →POU. |
Could not resolve reference to 'name'. The function with this name has no return value. or
Could not resolve reference to 'name'. The method with this name has no return value.
Solution: Complete the syntax so that it is a valid object. See "Supported ST-syntax"
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
In the declaration of the →function, enter the data type of the return value because a return value is assigned within the function (as shown in the example).Alternative: Delete the →assignment of the return value (line The same is valid for a →method. |
Missing POU or data type: 'name'
Solution: Declare the missing →POU (see example) or the missing →data type. Alternative, if the POU or the data type is not needed: Delete the element that is highlighted as faulty.
Example:
Faulty code |
Correct code |
---|---|
|
|
Unexpected end of file
Solution: Complete the syntax so that it is a valid object. See "Supported ST-syntax"
Examples:
Faulty code |
Correct code |
---|---|
|
|
|
|
Identifier "name" already declared
Solution: In the declaration, enter an →IEC-identifier as name that has not been used yet.
Examples:
Faulty code |
Correct code |
---|---|
|
|
|
|
Value out of range
Solution: Enter a smaller value so that the value is within the valid range.
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
Enter a length < 32.768 for the |
Type mismatch: An error occurred while resolving an expression
Solution: Correct the faulty →expression so that it matches the required →data type. Alternative: Adjust the data type accordingly.
Examples:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
In the →assignment, enter →literals possible according to the declared data type and not outside of the lower and upper limit. See "Supported data types (in ST)" for lower and upper limits of the data types. |
|
|
|
|
|
Alternative: Enter a typed literal according to a data type for which the →IEC-standard allows an implicit conversion. |
|
|
|
|
|
|
|
|
|
|
|
Details on using reference variables are given under "Declaration of reference variables (incl. assignments to them)". |
Parameter has already been assigned
Solution: In the formal →call, enter each →input variable and →output variable just once. If you want for brush up your knowledge about formal and non-formal call, see FAQ-article "When to use a formal call? When to use a non-formal call?".
Example:
Faulty code |
Correct code |
---|---|
|
|
Too many parameters
Solution: In the non-formal →call, enter the same number of input variables as given in the declaration. If you want for brush up your knowledge about formal and non-formal call, see FAQ-article "When to use a formal call? When to use a non-formal call?".
Example:
Faulty code |
Correct code |
---|---|
|
|
Too few parameters
Solution. if it is a user block: In the non-formal →call, enter the same number of input variables as given in the declaration. If you want for brush up your knowledge about formal and non-formal call, see FAQ-article "When to use a formal call? When to use a non-formal call?".
Solution, if it is an extensible system block: Enter values for the input variables that are required for the correct functionality of the system block. Usually, values for the first 2 inputs are required.
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
Alternative: Replace the non-formal call by a formal call. You can omit inputs/outputs within the parameter list, if it is a formal call. See e.g. "Call of function in ST" about the behavior of omitted input variables. |
|
|
Alternative: Replace the non-formal call by a formal call. You can omit inputs/outputs within the parameter list, if it is a formal call. See e.g. "Call of function in ST" about the behavior of omitted input variables. |
Unable to find library ''name''. or
"name" is not a valid property for a library block. or
Property "name" must be of data type STRING. or
Element "name" of property "name" is invalid
Solution: Contact the manufacturer of the used library or block. Include your contact information, information on what you were doing in Neuron Power Engineer and all messages listed in the Error Log view and/or Problems view.This message indicates that the system functions or system function blocks of Neuron Power Engineer(e.g. the standard blocks) contain an incorrect reference to the system library or an incorrect property. Usually, this message does not occur when handling the blocks as described in the user documentation.
Library ''name'' does not exist
Solution: Delete the statement with the faulty library within the code or replace it by the correct syntax.
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
END_FUNCTION |
|
This message indicates that the code in your ST-objects or PLC-objects contain an incorrect reference to the system library. Usually, you do not need any reference to the system library in your code. |
Name of variable is identical to the one of the function
Solution: In the declaration, enter an →IEC-identifier as name that has not been used yet.
Example:
Faulty code |
Correct code |
---|---|
|
|
Expression has no return value
Solution: Enter a →data type at declaration of the →function and/or assign a return value to the function.
Examples:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
Enter a data type at the declaration of the function. |
|
|
Enter a data type at the declaration of the function and assign a return value to the function. |
Variable "name" is defined as constant
Solution: Within the declaration of the →variables, delete the keyword CONSTANT
(see example). Alternative: Delete the →assignment.
Example:
Faulty code |
Correct code |
---|---|
|
|
Solution 2, if the message is displayed for the assignment to a step marker or a step timer: Correct the assignment so that Neuron Power Engineer does not write to these properties anymore.
Cannot resolve type of language element.
Solution 1: Check whether there are other messages hinting at the error.
Solution 2: Consult the IDE documentation whether it contains any restrictions or other notes on the used language element or system block.
Solution 3, if you do not have sufficient hints to eliminate the error: Contact the support team of Neuron. Include your contact information, information on what you were doing in Neuron Power Engineer and all messages listed in the Error Log view, Problems view
Variables with generic data types cannot be initialized.
This message applies only to system blocks.
Solution: Instead of the →generic data type, enter an elementary data type (see "Supported data types (in ST)").
Array index "number" is out of bounds ["number", "number"].
Solution: Enter an →array →subscript in the →assignment so that it is within the index subrange (see example). Alternative: Correct the index subrange, defined within the declaration of the →array data type.
Example:
Faulty code |
Correct code |
---|---|
|
|
Invalid array range
Solution: Correct the index subrange. See "Declaration of an ARRAY data type in ST" for the specifications on an index subrange.
Example:
Faulty code |
Correct code |
---|---|
|
|
Index access for variable "name" is not allowed in this form.
Solution: Correct the →assignment so that it fits the declaration (see example). Alternative: Correct the declaration so that there is an appropriate array or a string variable. See "Declaration of an ARRAY data type in ST" and/or "Declaration of STRING variables (incl. access)" for information on those variables.
Example:
Faulty code |
Correct code |
---|---|
|
|
Functions may not return function blocks, interfaces or classes.
Solution: In the declaration of the →function, enter a supported data type (instead of the function block, →interface or a →classes), if a return value is assigned within a function.
Example:
Faulty code |
Correct code |
---|---|
|
|
"name" must not be used because it is a reserved keyword.
Solution: Correct the faulty term in the code so that it is not a keyword anymore. See "Reserved keywords in ST" for a list of the keywords that must not be used.
Assignment to input variable "name" is not allowed.
Solution: Correct the code so that it is not an →input variable any longer (see example) or the code does not write to the input variable any longer.
Example:
Faulty code |
Correct code |
---|---|
|
|
Only numeric data types are allowed when using the mathematical operator symbol.
Solution: Correct the code so that the →variables/→literals within the faulty expression are using a →numeric data type (see example). Alternative: Do not use a mathematical operator or convert the variable/literal explicitly by using a Convert function into a numeric value.
Example:
Faulty code |
Correct code |
---|---|
|
|
Only numeric or time data types are allowed when using the mathematical operator symbol.
Solution: Correct the code so that the variables/literals within the faulty expression are using a numeric data type or the data type TIME (see example). Alternative: Do not use a mathematical operator or convert the variable/literal explicitly by using a Convert function into a numeric or time value.
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
Mind the correct combination of the →literals/→variables for multiplication, division, addition and subtraction, if the operation is done for literals/variables of data type |
Only integer data types are allowed when using the mathematical operator symbol.
Solution: Correct the code so that the variables/literals within the faulty expression are using a data type belonging to the →generic data type ANY_INT
(see example). Alternative: Do not use a mathematical operator or convert the variable/literal explicitly by using a Convert function into an integer value.
Example:
Faulty code |
Correct code |
---|---|
|
|
Only bitstring data types are allowed when using Boolean operators.
Solution: Correct the code so that the →variables/→literals within the faulty expression are using a →bit string data type (see example). Alternative: Do not use a Boolean operator or convert the variable/literal explicitly by using a Convert function into a bit string value.
Example:
Faulty code |
Correct code |
---|---|
|
|
When using comparison operators, the data type must match or must be implicitly convertible.
Solution: Correct the code so that the →variables/→literals within the faulty expression are using the same →data type (see example) or data types that may be converted implicitly. Alternative: Do not use an operator for comparison/equality/inequality or convert the variable/literal explicitly by using a Convert function into the required data type format.
Example:
Faulty code |
Correct code |
---|---|
|
|
String index "number" is out of bounds ["number", "number"].
Solution: In the →assignment, enter a position for the STRING variable that resides within the maximum length (see example). Alternative: In the declaration, correct the maximum length of the STRING variable. See "Declaration of STRING variables (incl. access)" for more information.
Example:
Faulty code |
Correct code |
---|---|
|
|
Strings with undefined length are not allowed.
Solution: Enter a maximum length for the STRING variable. See "Declaration of STRING variables (incl. access)" for more information.
Example:
Faulty code |
Correct code |
---|---|
|
|
Initial value "name" of length "number" does not fit into STRING["number"].
Solution: Correct the initial value so that it fits the maximum length (see example). Alternative: Correct the maximum length for the STRING variable so that the initial value is not faulty any longer. See "Declaration of STRING variables (incl. access)" for more information.
Example:
Faulty code |
Correct code |
---|---|
|
|
References to interfaces are not allowed.
Solution: Do not use references for →interfaces but declare an interface. See "Declaration of reference variables (incl. assignments to them)" about possible reference declarations.
Platform "BuiltInPlc" is not allowed here.
Solution: Best practice is to use the content assist in order to enter the requested platforms for →C-blocks. See section "Integrating C-code and/or C++-code into the application (deprecated)" for points to observe when creating C-blocks.
EN/ENO in REF() is not allowed.
Solution: Delete the parameters for the execution control parameters EN
and ENO
within REF(...)
. See "Declaration of reference variables (incl. assignments to them)" about possible assignments to references.
The assignment of the variable "name" to VAR_IN_OUT "name" of the block is not allowed. Reason: It is either a temporary variable within a function block or a variable within a function that is not an external variable.
Solution: Correct the assignment so that a variable of a different type is assigned. See "→Variable" for a list of the possible variable types (incl. links for details).
Example:
Faulty code |
Correct code |
---|---|
|
|
|
|
The assignment to VAR_IN_OUT "name" of the block must be a non-temporary variable.
Solution: Correct the assignment so that an appropriate variable is assigned.
Example:
Faulty code |
Correct code |
---|---|
|
|
|
|
"name" is not a constant variable.
Solution: Correct the label in the CASE statement to an integer →literal or a →variable which is evaluated as →constant value during the runtime.
Example:
Faulty code |
Correct code |
---|---|
|
|
Invalid range for label in CASE statement
Solution: Correct the label in the CASE statement so that the range is entered correctly.
Example:
Faulty code |
Correct code |
---|---|
|
|
RETAIN and NON_RETAIN is not allowed for the same variable declaration.
Solution: Correct the variable declaration (e.g. the section VAR
) so that only the keyword RETAIN
or NON_RETAIN
is entered. The declaration of more sections of a kind is allowed.
Example:
Faulty code |
Correct code |
---|---|
|
|
RETAIN is not allowed for the variable declaration in a function.
Solution: Delete the keyword RETAIN
in the variable declaration (e.g. the section VAR
) within the function.
Example:
Faulty code |
Correct code |
---|---|
|
|
NON_RETAIN is not allowed for the variable declaration in a function.
Solution: Delete the keyword NON_RETAIN
in the variable declaration (e.g. the section VAR
) within the function.
Example:
Faulty code |
Correct code |
---|---|
|
|
Arrays of REF_TO are not allowed.
Solution: Adjust the ARRAY declaration so that only allowed constructs are entered.
Recursion detected: "construct"
Solution: Adjust the ST-code so that there is no recursion any longer.
Example:
Faulty code |
Correct code |
---|---|
|
|
|
|
EXIT or CONTINUE are only allowed within the iteration statements FOR, WHILE and REPEAT.
Solution: Use the EXIT
and CONTINUE
statements only in the iteration statements FOR
, WHILE
or REPEAT
.
Fewer values in initializing list than array elements. The remaining elements are initialized with the default value.
Solution: Adjust the initializing list or the array elements so that the number matches (details on array elements: see "Declaration of an ARRAY data type in ST"). Alternative: You are allowed to ignore this message because it is a warning.
More values in initializing list than array elements.
Solution: Adjust the initializing list or the array elements so that the number matches (details on array elements: see "Declaration of an ARRAY data type in ST").
Declaration of a function block instance, of an interface or of a class is not allowed at this location. or
Declaration of a function block instance, of an interface or of a class is not allowed at this location. Path: path
Solution: Declare e.g. a function block instance within of VAR ... END_VAR
. Details: see "Declaration of function block instances in ST", "Declaration of an interface incl. method prototypes" or "Declaration of a class in ST"
Declaration of a function block instance, an interface or a class is not allowed in a variable declaration with CONSTANT.
Solution: Declare e.g. a function block instance within of VAR ... END_VAR
that does not contain the keyword CONSTANT
. Several sections of VAR ... END_VAR
are allowed. Details: see "Declaration of function block instances in ST", or "Declaration of an interface incl. method prototypes" or "Declaration of a class in ST"
Assignment to output variable "name" of function block "name" is not allowed here.
Solution: Delete the highlighted →assignment to the →output variable of the →function block instance. Alternative: Change the assignment so that the assignment is no longer done to an output variable of a function block instance.
Assignments to output variables of function blocks outside of this function block might become possible, if you deactivate the rule that is not allowing such assignments.
Example:
Faulty code |
Correct code |
---|---|
|
|
Invalid data type literal.
Solution: Change →literal so that it is allowed for the →data type.
Example:
Faulty code |
Correct code |
---|---|
|
|
Illegal call because the instance of the function block or the class is declared as input.
Solution: Use a reference to the function block instance.
Example:
Faulty code |
Correct code |
---|---|
|
|
Illegal call of interface. It is allowed to call only methods of the interface. or
Illegal call of class. It is allowed to call only methods of the class.
Solution: Correct the →call so that a →method of the interface or the class is called.
Invalid expression for the string length.
Solution: Correct the expression to a valid one for the length of the STRING variable. Example: STRING[10+2]
is valid while STRING[10+2 > 6]
is invalid.
Strings with length "number" are not allowed.
Solution: Enter a length higher than the specified number for the STRING variable. See "Declaration of STRING variables (incl. access)" for more information.
Example:
Faulty code |
Correct code |
---|---|
|
|
VAR_IN_OUTs are declared in "name". Informal call is not allowed.
Solution: Use a formal →call with assignments to all →in-out variable (see FAQ article "When to use a formal call? When to use a non-formal call?" and "Declaration of in-out variables in ST" for more information).
Example:
Faulty code |
Correct code |
---|---|
|
|
VAR_IN_OUTs are declared in "name". The call must contain assignments with ':=' to all VAR_IN_OUTs.
Solution 1: Use a formal →call with assignments to all →in-out variable (see "Declaration of in-out variables in ST" for more information).
Solution 2: If a formal call is already used, use the assignment operator := for the assignment to in-out variables.
Examples:
Faulty code |
Correct code |
---|---|
|
|
|
|
VAR_IN_OUT demands expressions which might be on the left side of the assignment operator ':=' as well.
Solution: Correct the assignment for the →in-out variable, in particular the expression on the right side of the assignment operator ":=
" . There enter an expression which might be on the left side of the assignment operator ":=
" as well.
Example:
Faulty code |
Correct code |
---|---|
|
|
REF_TO is not possible for VAR_IN_OUT variables with data type 'ANY'.
Solution: Correct the call of the block with the →in-out variable of the →generic data type ANY
so that a →reference is connected no longer.
It is not allowed to initialize a VAR_IN_OUT variable.
Solution: Delete the initial value.
Example:
Faulty code |
Correct code |
---|---|
|
|
"Name" must be assigned to a variable.
Solution: Assign the call of the block to a variable.
Only number array dimensions allowed.
Solution: Correct the array declaration so that the specified restrictions are met. Details: see "Declaration of an ARRAY data type in ST".
Parameter "name" cannot be connected with multi-dimensional arrays.
Solution: Connect the specified parameter of the block with a one-dimensional →array data type.
"name" cannot be assigned to multi-dimensional arrays.
Solution: Assign the specified block to a one-dimensional →array data type.
Variable-length arrays are only supported for system functions and function blocks.
Solution: Replace the variable-length array by an array with a definite index subrange [x..y]
.
Example:
Faulty code |
Correct code |
---|---|
|
|
Variable-length arrays are not allowed in a user-defined data type.
Solution: Replace the variable-length array by an array with a definite index subrange [x..y]
.
Example:
Faulty code |
Correct code |
---|---|
|
|
Functions that return an array of variable length may only appear on the right hand side of an assignment statement.
Solution: Enter the function returning an variable-length array (e.g. ADD_2D_ARRAY block) on the right hand side of an →assignment statement only.
Example:
Faulty code |
Correct code |
---|---|
|
|
Function block instance is used with incompatible types (instance has been set to "type").
Solution: Use the data type which is specified in the error message for all calls of the →function block instance.
Example:
Faulty code |
Correct code |
---|---|
|
|
Declaration of an overloaded function block instance is not allowed at this location.
Solution: Declare such →function block instances in local variable (VAR
) sections only.
Example:
Faulty code |
Correct code |
---|---|
|
|
References to constant variables are not allowed.
Solution: Do not use →reference to →constant variables.
Example:
Faulty code |
Correct code |
---|---|
|
|
A structure must contain at least one element.
Solution: Enter at least one structure element in the →structured data type.
Example:
Faulty code |
Correct code |
---|---|
|
|
Mixing formal and informal parameter assignments is not allowed.
Solution: Use either a formal →call or an non-formal call. See FAQ-article "When to use a formal call? When to use a non-formal call?" for details on the calls.
Example:
Faulty code |
Correct code |
---|---|
|
|
"name" cannot be assigned to array of structure.
Solution: Just use those data types that are supported for the specified block. See the appropriate article in the user documentation.
Assignment from output parameter demands expressions which might be on the left side of the assignment operator ':=' as well.
Solution: Correct the assignment from the output parameter in the call, in particular the expression on the right side of the assignment operator "=>
" . There enter an expression which might be on the left side of the assignment operator ":=
" as well.
Example:
Faulty code |
Correct code |
---|---|
|
|
"name" is not an input variable.
Solution: Correct the assignment in the call (see example). Alternative: Correct the declaration of the variable so that is is an →input variable.
Example:
Faulty code |
Correct code |
---|---|
|
|
"name" is not an output variable.
Solution: Correct the assignment in the call (see example). Alternative: Correct the declaration of the variable so that is is an →output variable.
Example:
Faulty code |
Correct code |
---|---|
|
|
Variable "name" is not accessible in this context.
Solution: Correct the declaration of the variable. Alternative: Delete the access to the variable. The access might become possible, if you deactivate the rules that do not allow the assignments to/from variables.
Example: →In-out variables are not visible outside the POU in which they have been declared. These in-out variables are visible within the call of the POU (see the alternative for correct code).
Faulty code |
Correct code |
Alternative for correct code |
---|---|---|
|
|
|
REF_TO, a function block, an interface or a class is not possible as base type for a user-defined data type.
Solution: Correct the declaration of the →derived data type. See "Declaration of a directly derived data type in ST" for the restrictions when using derived data types.
Example:
Faulty code |
Correct code |
Details on solution |
---|---|---|
|
|
|
|
|
Assumption: |
Nesting too deep for "name".
Solution: Reduce the nestings of the data types. See "Declaration of a directly derived data type in ST" for the restrictions when using derived data types.
Variable "name" is unused.
Solution: If necessary, correct the ST-code – either delete the declaration or use the declared variable.
Result value of function "name" is not assigned.
Solution: If necessary, correct the ST-code – either delete the return value of the function (the data type entered at its declaration) or assign the return value within the function.
It is not allowed to combine SFC elements and ST statements in this form.
Solution: Delete the SFC elements or the ST assignments (e.g. block calls or assignments) so that they are not combined at the upmost level with the POU any longer.
Several initial steps are existing in the same SFC network. But an SFC network must contain exactly one initial step.
Solution: Delete the redundant initial steps. Alternative: Correct the SFC elements so that several SFC networks exist in the POU.
Step "name" is used in an SFC network without an initial step. But an SFC network must contain exactly one initial step.
Solution: Create an initial step for the SFC network. Alternative: Enter an already existing initial step as predecessor or successor step for a transition within the SFC network in which the named step is used.
Transition "name" is used in an SFC network without an initial step. But an SFC network must contain exactly one initial step.
Solution: Create an initial step for the SFC network. Alternative: Enter an already existing initial step as predecessor or successor step for a transition within the SFC network in which the named transition is used.
A step must not be used within a step.
Solution: Correct the ST-code by specifying an →action within the step.
The priority of transitions is not evaluated.
Solution: Delete the specification PRIORITY
entered for transitions.
Ambiguous identifier "name". Found in: POU1, POU2, ...
Solution: Just use one USING
→namespace directive (see example). Alternative: Correct the declarations of the POUs within the namespaces so that they have a unique identifier and use the POU with the unique name (after all USING
directives).
Example:
Faulty code |
Correct code |
---|---|
|
|
"name" included more than once.
Solution: Enter different names in the INCLUDE_GLOBAL
directives (see example). Alternative: Delete the duplicates. See "Declaration of global variables in global-object and its usage in ST" for information on the usage.
Example:
Faulty code |
Correct code |
---|---|
|
|
Invalid partial access for "name".
Solution: Correct the partial access or the declaration for the variable so that it is a correct partial access for the variable. See "Partial access of ANY_BIT variables" for information on the usage.
Example:
Faulty code |
Correct code |
---|---|
|
|
|
|
References to temporary variables are not allowed.
Solution: Correct the assignment to the reference variable or the declaration for the variable so that it is a correct assignment. See "Declaration of reference variables (incl. assignments to them)" about possible reference declarations.
Example:
Faulty code |
Correct code |
---|---|
|
|
References to in-out variables are not allowed as initial value for reference variables.
Solution: Delete the initial value for the declared reference variable. Create an assignment in which you assign the reference to the in-out variable.
Example:
Faulty code |
Correct code |
---|---|
|
|
Identifier exceeds the maximum length by number characters.
Solution: Shorten the identifier. It must not exceed 127 characters.
References to DMA-variables are not allowed.
Solution: Do not use global variables with attribute DMA
for assignments to variables declared with REF_TO
or in section VAR_IN_OUT
.
Assignment to named value "name" is not allowed.
Solution: Correct the assignment so that the named value is not located on the left side of the assignment operator ":=
" any longer.
Example:
Faulty code |
Correct code |
---|---|
|
|
The usage of "EN" is here not allowed. Only assignments to "EN" within the call of a block are possible.
Solution: Correct the use of EN
.
Example:
Faulty code |
Correct code |
---|---|
|
|
Property "name" is defined multiple times
Solution: Correct the code so that the mentioned property is defined just once.
Unsupported expression in the parameter list of this call.
Solution: Correct the parameter list of the →call by deleting the assignments with the faulty highlighted expressions. If necessary, declare and initialize one or several auxiliary variables, then use these auxiliary variables in the parameter list of the call.
Examples:
Faulty code |
Correct code |
---|---|
|
|
|
|
Reason exceeds the maximum length by number characters.
Solution: Shorten the reason. It must not exceed 255 characters.
The given data type does not allow a bit size specification.
Solution: Delete the attribute SIZE
that has been specified for the data type. Alternative: Change the base data type to one of the data types for which the attribute SIZE
is allowed. Details: see "Declaration of a directly derived data type in ST"
The bit size is outside of the allowed range for the data type.
Solution: Adapt the specification for the attribute SIZE
so that the specification is within the range allowed for the base data type. Details: see "Declaration of a directly derived data type in ST"
Invalid index subrange for an array.
Solution: Correct the used array data type.
Invalid index subrange for an array: Illegal data type.
Solution: Correct the base data type for the data type with the named values. Details: see "Using named values as array limits"
Example:
Faulty code |
Correct code |
---|---|
|
|
Invalid index subrange for an array: Illegal value (corresponds to decimal value "value") for the array limit.
Solution: Correct the corresponding value for the data type with the named values. Details: see "Using named values as array limits"
Example:
Faulty code |
Correct code |
---|---|
|
|
Could not load tooltip data for some annotation markers.
There is a task icon within the border left of the code. No tooltip can be displayed for this icon.
Solution: Move the mouse pointer onto the icon displayed within the border right of the code. The tooltip is displayed for this icon.
The access scope is only evaluated for library elements.
Solution: Search for the specification { AccessLevel := ...}
. If the specification is included in a user-defined POU within the project (hence, not within a library), delete this specification.
Note: The statement { AccessLevel := ...}
is automatically generated by Neuron Power Engineer, in particular for a POU within a library as the POU is specified within a library configuration.
The declaration of a function block instance, of an interface or of a class is not allowed due to "{noCodeGeneration}".
Solution: Delete the declaration of the function block instance, of the interface or of the class from the section with the declaration of the internal variables (= the instance parameters). Alternative: Delete the specified →pragma from the section.
A structure element of the data type "name" uses a function block as type. However, this usage is not allowed due to "{noCodeGeneration}".
Solution: Delete the used function block from the →structured data type. Alternative: Delete the specified pragma from the section with the declaration of the internal variables.
The variable "name" must not be used due to "{noCodeGeneration}".
Solution: Do not use the variable within the ST-code (e.g. within an →assignment). Alternative: Delete the specified pragma from the section with the declaration of the internal variables.
The usage of "{noCodeGeneration}" is not allowed within a function. or
The usage of "{instanceParam}" is not allowed within a function. or
Declaration of a function block instance, of an interface or of a class is not allowed at this location due to "{instanceParam}". or
REF_TO is not allowed at this location due to "{instanceParam}".
Solution: Delete the specified pragma from the section with the appropriate declaration.
Best practice is to use "{noCodeGeneration}" together with "{instanceParam}".
Solution: Enter both pragmas in the section with the declaration of the internal variables.
The instance parameters refers the illegal variable "name".
Solution: Correct the variable that is entered after @RELATES_TO
within the instance parameters so that it is not an illegal variable anymore. Illegal variables are:
-
variables that are declared as the instance parameters (= within a section with the declaration of the internal variables and the pragma
{instanceParam}
)
"@RELATES_TO" is only allowed for instance parameters. The pragma "{instanceParam}" is required for such instance parameters.
Solution: Delete the pragma { @RELATES_TO := name;}
for the variable. Alternative: Add the pragma {instanceParam}
within the section with the declaration of the internal variables so that the variables within the section become instance parameters.
The variable "name" must not be used for different "@RELATES_TO" pragmas.
Solution: Correct the variable that is entered after @RELATES_TO
within the instance parameters so that a different variable is used.
Illegal data type "name" with instance parameter "name". Only elementary or structured data types are legal.
Solution: Correct the →data type of the mentioned instance parameter so that it is either an elementary or a →structured data type.
Faulty global object "Name".
Solution: Fix the error in the global-object. See "Declaration of global variables in global-object and its usage in ST" for information on the content of the global-object.
VAR_IN_OUT of data type "STRING" demands the same or greater string length.
Solution: Enter the same or a greater length for the other STRING
variable.
Example:
Faulty code |
Correct code |
---|---|
|
|
"name" must not be used in the method because it is either a temporary variable or an in-out variable of the function block.Additional information: All methods have read/write access to the →static variables declared in the function block but no access to the →temporary variables and the →in-/out variables of the function block.
Solution: Correct the →method so that it uses a variable of a different variable section – one that allows access for the method.
Modifier "name" is ignored because only public methods are supported.
Additional information: This message is a warning. Neuron Power Engineer is automatically using the keyword PUBLIC
for the public call of the method.
Solution: Ignore this message. Or delete the mentioned keyword for the method.
The variables in methods must be unique. But there is already a variable with the name "name" in the function block "name".
Solution: For the variable within the method, enter an →IEC-identifier as a name that has not been used in the mentioned function block yet.
An interface cannot be the base type of an array.
Solution: Delete the →interface and enter a →data type for the declaration.
Interfaces are not allowed for VAR_IN_OUT variables.
Solution: Declare the variable based on an interface within an allowed section of variables. See "Declaration of variables based on an interface" for the possible sections.
The function block "name" must implement the following methods: name_1, name_2, ...
Solution: Declare all required methods within the function block. Best practice is to use the quick fix of Neuron Power Engineer to add the unimplemented methods within the function block.
Additional information: These methods might be method prototypes of an interface or abstract methods of a base function block. See "Declaration of an interface incl. method prototypes" or "Declaration of a method".
A method with the same name already exists in "name". or
A variable with the same name already exists in "name".
Solution: In the declaration of the language element, enter an →IEC-identifier as name that has not been used yet. Alternative for a method: Use the quick fix Add OVERRIDE in order to overwrite the method (in the base function block). See under "Declaration of a method" for more information on OVERRIDE
.
The following methods already exist with the same names in multiple parent function blocks, interfaces or classes: name_1, name_2, ...
Solution 1: In the declaration of methods, enter an →IEC-identifier as name that has not been used yet.
Solution 2: In the declaration of interfaces or classes, delete the base interface that is containing a method prototype of the same name from the specifications behind EXTENDS
(which makes the interface be derived from the base interface).
Cycle detected: A cycle exists in the type hierarchy between "name" and "name".
Solution: Resolve the cycle. In the declaration of the interfaces, delete one of the specified base interfaces from the specifications behind EXTENDS
(which makes the interface be derived from the base interface).
Cycle for definition of "name" detected.
Solution: Resolve the cycle.
The interface, function block or class "name" must not extend itself.
Solution: In the declaration of the language element, delete the name of the language element from the specifications behind EXTENDS
(which makes the language element be derived from itself).
The base function block "name" must contain the keywords "EXTENDS", "IMPLEMENTS" or methods.
Solution: Specify the required keywords and/or methods for the base function block. See under "Declaration of a function block in ST" for details on a base function block.
SUPER() is not allowed within the iteration statements FOR, WHILE and REPEAT. or
SUPER() is not allowed to be used multiple times in the function block body. or
SUPER() is not allowed without EXTENDS.
Solution: Use the statement SUPER()
; in the derived function block as described under "Declaration of a function block in ST".
A method with the same name does not exist in the base function blocks.
Solution: Delete the keyword OVERRIDE
specified for the method in the derived function block. Alternative: Declare the method in the base function block.
The method "name" cannot be overridden due to different signatures.
Solution: Correct the current method (in the derived function block) so that its →signature matches the one of the overwritten method (in the base function block). See under "Declaration of a method" for more information on OVERRIDE
.
It is allowed to use either OVERRIDE or ABSTRACT. or
Only abstract function blocks can contain abstract methods. or
An abstract function block must not be instantiated. or
An abstract function block must contain at least one abstract method. or
An abstract method must not contain statements.
Solution: Correct the syntax so that it is a valid object. See "Declaration of a function block in ST" and "Declaration of a method" for information on abstract function blocks and methods.
The function block "name" has been denoted with the keyword FINAL. Hence, a function block must not be derived from this function block. or
The method "name" has been denoted with the keyword FINAL. Hence, it must not be overwritten.
Solution: Correct the syntax so that it is a valid object. See "Declaration of a function block in ST" and "Declaration of a method" for information on function blocks and methods using FINAL
.
FINAL is redundant for the method because the function block "name" is already final.
Solution: Delete the keyword FINAL
either for the method or the function block.
The method must not be called with "SUPER" because it is either an abstract method or a method of an interface.
Solution: Correct the syntax so that it is a valid object. See "Declaration of a method" for information on methods.
A method with the same name but a different signature exists in "name".
Solution: Correct one of the methods so that the →signatures are matching. Alternative: Rename one of the methods.
The method "name" cannot be overwritten/implemented since it is not visible in the current context. or
Method "name" is not accessible in this context. or
The method "name" must have the same visibility as the overwritten/implemented method of the same name.
Solution: Correct the keyword for the method so that it will be visible as requested or so that the access to it is possible. See "Declaration of a method" for the keywords that can be used to define where the method is visible.
OVERRIDE is not necessary.
Solution: Use the quick fix Remove OVERRIDE in order to remove the keyword that is not necessary for the method). See under "Declaration of a method" for more information on OVERRIDE
.
The method "name" must not be abstract because a base function block already contains a method with the same name but an implementation.
Solution: Remove the keyword ABSTRACT
for the method. Alternative: Correct the method in the base function block.
The used C-block "name" is not contained in a library.
Solution: Delete the usage of the specified →C-block. Create a library containing this C-block (if the library supports this C-block type) and use the C-block from this library. The usage of the C-block might become possible, if you deactivate the rule that validates that C-blocks must be contained in libraries.
Name is marked as read-only.
Additional information: The specified object or the specified file contains a read-only statement.
Solution: Contact the creator of the object or the file and clarify the reason for the read-only statement and how to continue.
Only elementary data types without the ANY_CHAR data types are allowed when using the pragma "{safe}".
Additional information: Due to the statement {safe}
, not all data types are allowed in the declared ST element. Usually, this statement is used only when developing a safety-relevant application.
Solution: Change the data type to another data type. Or delete the pragma.
Invalid JSON string
Solution: Correct the data for the custom data (= JSON string). Details: See "Defining description, comment, JSON string or type for variables or data types" for the syntax of a JSON-string.
A class must not use "EXTEND" to derive the class from the function block "name".
Solution: In the declaration of the class, replace the name of the function block from the specifications behind EXTENDS
by the name of a class.
Attribute "SIZE" for "name" is ignored because the structure is "value" whereas the attribute "SIZE" has defined "value".
Solution: Define a fitting value for the attribute SIZE
of the structured data type. See "Declaration of a language element with partial address in ST" for details on SIZE
.